import type { PluginOption } from "vite";
// import type { PluginVisualizerOptions } from 'rollup-plugin-visualizer';

/**
 * 用于判断是否需要加载插件
 */
export interface ConditionPlugin {
    // 判断条件
    condition?: boolean;
    // 插件对象
    plugins: () => PluginOption[] | PromiseLike<PluginOption[]>;
}

export interface IImportMap {
    imports?: Record<string, string>;
    scopes?: {
        [scope: string]: Record<string, string>;
    };
}

/*
interface PrintPluginOptions {
  /**
   * 打印的数据
   *
  infoMap?: Record<string, string | undefined>;
}

interface NitroMockPluginOptions {
  /**
   * mock server 包名
   *
  mockServerPackage?: string;
  /**
   * mock 服务端口
   *
  port?: number;
  /**
   * mock 日志是否打印
   *
  verbose?: boolean;
}


/**
 * importmap 插件配置
 *
interface ImportmapPluginOptions {
  /**
   * CDN 供应商
   * @default jspm.io
   *
  defaultProvider?: 'esm.sh' | 'jspm.io';
  /** importmap 配置 *
  importmap?: Array<{ name: string; range?: string }>;
  /** 手动配置importmap *
  inputMap?: IImportMap;
}


export type {
  ApplicationPluginOptions,
  ArchiverPluginOptions,
  CommonPluginOptions,
  ConditionPlugin,
  DefineApplicationOptions,
  DefineConfig,
  DefineLibraryOptions,
  IImportMap,
  ImportmapPluginOptions,
  LibraryPluginOptions,
  NitroMockPluginOptions,
  PrintPluginOptions,
};

*/
